package com.zymail.config;


import com.zymail.entity.WechatConstant;
import com.zymail.wxpay.IWXPayDomain;
import com.zymail.wxpay.WXPayConfig;
import com.zymail.wxpay.WXPayConstants;

import java.io.InputStream;

public class MyWXPayConfig extends WXPayConfig {

    @Override
    protected String getAppID() {
        return WechatConstant.APPID;
    }

    @Override
    protected String getMchID() {
        return WechatConstant.MCH_ID;
    }

    @Override
    protected String getKey() {
        return WechatConstant.MCH_KEY;
    }

    @Override
    protected InputStream getCertStream() {
        return null;
    }

    @Override
    protected IWXPayDomain getWXPayDomain() {
        return new IWXPayDomain() {
            @Override
            public void report(String domain, long elapsedTimeMillis, Exception ex) { }

            @Override
            public DomainInfo getDomain(WXPayConfig config) {
                return new IWXPayDomain.DomainInfo(WXPayConstants.DOMAIN_API, true);
            }
        };
    }


}
